package com.weiwei.diancan.view;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.ListView;


/**
 * Conpany:成都欧品在线电子商务有限公司技术服务中心
 * Auther:孙福义
 * Date: 2016/1/26
 * Effect: 重写listview
 */
public class MyListView extends ListView {
    //重写onMeasure方法
    public MyListView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public MyListView(Context context) {
        super(context);
    }

    public MyListView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    @Override
    public void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
        super.onMeasure(widthMeasureSpec, expandSpec);
    }

}
